import request from '@/utils/request'

// 新建版头
export function addBanner(data) {
  return request({
    url: '/system/banner/add',
    method: 'post',
    data: data
  })
}

export function updateBanner(data) {
  return request({
    url: '/system/banner/update',
    method: 'put',
    data: data
  })
}

// 获取版头列表
export function getBannerById(id) {
  return request({
    url: '/system/banner/'+id,
    method: 'get'
  })
}

// 获取版头列表
export function getBannerList(query) {
  return request({
    url: '/system/banner/list',
    method: 'get',
    params: query
  })
}
// 删除
export function delBanner(id) {
  return request({
    url: '/system/banner/delete/' + id,
    method: 'delete'
  })
}

// 获取版头活动类型列表
export function getActivityTypeBanner(query) {
  return request({
    url: '/system/activity/listForType',
    method: 'get',
    params: query
  })
}